/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package karel.lang;

import org.junit.*;
/**
 *
 * @author Gummi
 */
public class RDParserTestNegative extends RDParserTest {
    
    @Before
    public void setUpClass() throws Exception {
        inoutFolder = "RDParserTestNegative";
    }
 
    @Test (expected=Exception.class)
    public void negative_identStartingWithNum() throws Exception {
        String testname = "identStartingWithNum";
        parseAndFail(testname);
    }
    
    @Test (expected=Exception.class)
    public void negative_ifstatement_fundecl() throws Exception {
        String testname = "ifstatement_fundecl";
        parseAndFail(testname);
    }
    
    @Test (expected=Exception.class)
    public void negative_ifstatement_vardecl() throws Exception {
        String testname = "ifstatement_vardecl";
        parseAndFail(testname);
    }
    
    @Test (expected=Exception.class)
    public void negative_namecall_var() throws Exception {
        String testname = "namecall_var";
        parseAndFail(testname);
    }
    
    @Test (expected=Exception.class)
    public void negative_namecall_nameNotDefined() throws Exception {
        String testname = "namecall_nameNotDefined";
        parseAndFail(testname);
    }
    
    @Test (expected=Exception.class)
    public void negative_namecall_assignment_with_function() throws Exception {
        String testname = "namecall_assignment_with_function";
        parseAndFail(testname);
    }
    
    @Test (expected=Exception.class)
    public void negative_namecall_assignment_with_nondecleared_var() throws Exception {
        String testname = "namecall_assignment_with_nondecleared_var";
        parseAndFail(testname);
    }
    
    @Test (expected=Exception.class)
    public void negative_return_in_main() throws Exception {
        String testname = "return_in_main";
        parseAndFail(testname);
    } 
    
    @Test (expected=Exception.class)
    public void negative_varCall_definedBelow() throws Exception {
        String testname = "varCall_definedBelow";
        parseAndFail(testname);
    } 
    
    @Test (expected=Exception.class)
    public void negative_vardecl_varAlreadyDefined() throws Exception {
        String testname = "vardecl_varAlreadyDefined";
        parseAndFail(testname);
    }    
}
